package com.ymatou.iapi.productsnapshot.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.productsnapshot.service.SyncProductSnapshotVersionListCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
/**
*定时更新快照版本至商品库
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_SyncProductSnapshotVersionList{
	private static SyncProductSnapshotVersionListCall syncproductsnapshotversionlistCall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("定时更新快照版本至商品库");
	}

	@Before
	public void caseUp() {
		syncproductsnapshotversionlistCall=new SyncProductSnapshotVersionListCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(syncproductsnapshotversionlistCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_SyncProductSnapshotVersionList_001() {
		Logger.start(true,"定时更新快照版本至商品库成功");
		try {
			syncproductsnapshotversionlistCall.callService();			
			Logger.verifyEquals("200", syncproductsnapshotversionlistCall.getString("Code"), "验证返回code");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}